<script setup>
const handleDownload = () => {
  const downloadLink = document.createElement('a');
  downloadLink.href = '/path/to/青书电脑直播助手.exe'; 
  downloadLink.download = '青书电脑直播助手.exe'; 
  document.body.appendChild(downloadLink);
  downloadLink.click();
  document.body.removeChild(downloadLink);
};
</script>
<template>
  <div class="download-page">
    <div class="header">
      <text>青书</text>
      <span class="title">电脑直播助手</span>
    </div>
    <div class="content">
      <div class="left">
        <h1>电脑直播助手，帮你开启便捷直播之旅</h1>
        <p class="subtext">配合青书App可以体验直播完整功能</p>
        <button class="download-btn" @click="handleDownload">立即下载</button>
        <p class="version">3.2.2 支持 Win8 及以上系统</p>
        <div class="links">
          <a href="#" target="_blank">常见问题</a>
          <span>|</span>
          <a href="#" target="_blank">去 OBS 开播</a>
          <span>|</span>
          <a href="#" target="_blank">下载使用说明</a>
        </div>
      </div>
      <div class="right">
        <img
          src="//fe-static.xhscdn.com/formula-static/spectrum/public/img/display-img.5e021ab.png" 
          alt="直播助手界面展示" 
          class="device-img"
        />
      </div>
    </div>
  </div>
</template>
<style scoped>
.download-page {
  width: 100%;
  min-height: 100vh;
  background-color: #fff;
  padding: 24px;
  box-sizing: border-box;
}
.header {
  display: flex;
  align-items: center;
  margin-bottom: 60px;
}
.header > text{
  background-color: #409EFF;
  border-radius: 8px;
  padding: 8px 16px;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  margin-right: 50px;
}
.title {
  font-size: 20px;
  font-weight: 600;
  color: #333;
}

.content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  margin-top: 100px;
}

.left {
  width: 40%;
}

.left h1 {
  font-size: 36px;
  color: #333;
  line-height: 1.4;
  margin-bottom: 24px;
}

.subtext {
  font-size: 18px;
  color: #666;
  margin-bottom: 36px;
}

.download-btn {
  background-color: #03c0ff;
  color: #fff;
  border: none;
  padding: 12px 36px;
  font-size: 16px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.download-btn:hover {
  background-color: #03c0ff;
}

.version {
  font-size: 14px;
  color: #999;
  margin-top: 12px;
  margin-bottom: 48px;
}

.links {
  font-size: 14px;
  color: #0084ff;
}

.links a {
  color: #0084ff;
  text-decoration: none;
  margin: 0 8px;
}

.links a:hover {
  text-decoration: underline;
}

.right {
  width: 55%;
  text-align: right;
}

.device-img {
  max-width: 100%;
  height: auto;
}
</style>